function init()
{
	this.select = select;

	this.aliases = {};
	
	var aliasesStr = this.element.parentNode.getAttribute("aliases");
	var aliasesArr = aliasesStr.split(",");
	for(var i=0; i<aliasesArr.length; i++)
	{
		this.aliases[aliasesArr[i]] = i;
	}

	var _var = this.element.parentNode.getAttribute("var");
	if(_var)
		phnq.client.setGlobal(_var, this);
	
	var selected = this.element.parentNode.getAttribute("selected");
	if(selected)
		this.select(selected);
}

function select(k)
{
	var idx = this.aliases[k];
	if(isNaN(idx))
		idx = k;
	
	var elmnt = this.element.nextSibling;
	while(elmnt)
	{
		if(elmnt.style)
		{
			if(idx--)
				elmnt.style.display = "none";
			else
				elmnt.style.display = "";
		}

		elmnt = elmnt.nextSibling;
	}
	
	phnq.phnqlets.update();
}
